wechat = require 'wechat'
Weixin = require '../models/weixin'

module.exports = wechat('token')
	.text (msg,req, res, next)->
		delete msg.MsgType
		WeixinText.create msg
		res.reply ''

	.event (msg, req, res, next)->
		res.reply '欢迎你<a href="#msg.FromUserName#"></a>'

	.middlewarify()

